Voice Characterization-Based Natural Language Filtering

ABSTRACT

An utterance is analyzed to determine a characteristic of the utterance and a transcription hypothesis is generated for the utterance. Grammar rules are then used to parse the transcription hypothesis to produce a plurality of interpretation hypotheses, each having a likelihood score. A set of authorized domains is determined based on the characteristic and the plurality of interpretation hypotheses are filtered according to the set of authorized domains. Of the remaining interpretation hypotheses, one is selected according to their likelihood scores. The characteristic may include one or more characteristics such as mood, prosody, or whether the utterance has a rising intonation.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application Ser.No. 62/438,920, entitled “Natural Language Grammar Enablement By SpeechCharacterization”, filed Dec. 23, 2016. This application is a divisionalapplication of U.S. Non-Provisional application Ser. No. 15/411,567,entitled “NATURAL LANGUAGE GRAMMAR ENABLEMENT BY SPEECHCHARACTERIZATION”, filed Jan. 20, 2017.

FIELD OF THE INVENTION

The present invention is in the field of voice-controlled machines, andparticularly improved interpreters of natural language grammar rules.

BACKGROUND

Some voice-controlled machines use speaker identification as a way, orpart of a way, to enable a user to access information or control asystem. This can be done by comparing a user's speech audio to apreviously collected “voiceprint” consisting of characteristics of auser's voice that allow the system to uniquely determine the user'sidentity (UID).

Some voice-controlled machines use utterance classification as a way, orpart of a way, to control system behavior. This is done by analyzingspeech audio and classifying the utterance. Some typical categories ofutterance classifications are the speaker gender; the speaker age group;the speaker accent, ethnicity, or nationality; the prosody of theutterance (such as speed, emphasis, and other vocal variations); thespeaker mood; and the speaker health.

Some voice-controlled machines perform natural language processing usinga grammar, which comprises rules. Some grammars group rules into domainsof knowledge. A semantic parser takes as input one or moretranscriptions likely to represent the words in the speech audio;processes the transcriptions using the grammar rules; and outputs one ormore interpretations likely to represent the meaning of the systemuser's speech. Interpretations are computer data structures thatrepresent the meaning of sentences. They represent sentence constituentsand their relationships. Action modules take interpretations as inputand perform appropriate actions. For example, some modules access datathrough web application programming interface (API) hits. Some modulesactuate motors to control the movements of mechanical devices. Somemodules perform communication operations, such as sending text messages.Some modules store information. Innumerable other functions are possiblewith appropriate action modules.

The system and methods disclosed herein provide an improved approach forgenerating interpretations of speech inputs.

SUMMARY OF THE INVENTION

The present disclosure is directed to systems, methods, and algorithmsthat use speech characterization to condition automatic speechrecognition and parsing according to natural language grammars.Characterization includes any of voice speaker identification, speakerclassification, and utterance classification. Embodiments of systemsdescribed herein apply characterization to speech recognition, naturallanguage processing, or both.

The present invention provides a human-machine interface that feels muchmore natural to users. Humans, in naturally interpreting spokenutterances, let clues about the attributes (age, gender, ethnicity,mood, prosody) of a speaker influence their interpretations.Furthermore, for specifically known speakers, humans apply all of theirknowledge of the speaker in their interpretations. These human skills ininterpretation work even without visual clues. Over telephone calls andteleconference humans interpret what they hear according to how theyclassify the voice of unknown speakers or identify particular knownspeakers by voice. The present invention provides for natural,conversational, human-machine interfaces in ways that conventionalapplications of voice classification and voice speaker identification donot.

Some embodiments use the valuable information identifiable from speakerand utterance characteristics to provide more appropriate and moreuseful behaviors and results. Characterization according to someembodiments comprises classification of the speaker by one or more ofage, gender, accent, prosody, and mood among other identifiablecharacteristics of speech utterances. Characterization according to someembodiments comprises voice speaker identification to identify a userprofile, including a set of permissions and a set of other propertiesthat describe the user.

Various embodiments perform automatic speech recognition (ASR) using thecharacterization to condition the usage of a statistical language model(SLM) or the set of resulting transcription hypotheses. Variousembodiments perform natural language processing (NLP) using thecharacterization to condition the grammar rules or resultinginterpretations. For some embodiments, conditioning includes absoluteBoolean enablement or disablement of SLM terms or grammar rules. Forsome embodiments, conditioning includes defining weights that affect thecomputation of hypothesis likelihood scores.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates operation of a speech-enabled device with voicespeaker identification authorization control.

FIG. 2 illustrates operation of a speech-enabled device with voicespeaker identification that conditions interpretation according to anembodiment of the invention.

FIG. 3 illustrates a flow chart of interpretation of transcriptionhypotheses conditioned by UID in accordance with an embodiment of theinvention.

FIG. 4 illustrates operation of a speech-enabled device utteranceclassification that conditions ASR and interpretation according to anembodiment of the invention.

FIG. 5 illustrates an ASR system with a vocabulary filter conditioned bya speech characteristic according to an embodiment of the invention.

FIG. 6 illustrates an ASR system with SLMs enabled by a speechcharacteristic according to an embodiment of the invention.

FIG. 7 illustrates a NLP system with domain enablement filteredaccording to a speech characteristic according to an embodiment of theinvention.

FIG. 8 illustrates a NLP system with domain weights conditioned by aspeech characteristic according to an embodiment of the invention.

FIG. 9 illustrates a NLP system with a grammar that is conditional basedon a speech characteristic according to an embodiment of the invention.

FIG. 10 illustrates a computer processing system according to anembodiment of the invention.

DETAILED DESCRIPTION Characterization

Various conventional voice controlled machines' action modules act oninterpretations in different useful ways, as affected by UID orutterance classification inputs. However, the speech recognitiontranscriptions and natural language interpretations are ignorant ofthose useful inputs. The interpreted meaning of the user speech does notconsider a particular user or the user's profile. The interpretedmeaning of the user speech does not account for user age, gender,accent, prosody, or mood. Valuable information is ignored in suchsystems.

Some embodiments of the invention capture audio that contains speechutterances using microphones or other mechanisms for convertingvoice-generated sound waves into electronic signals. Mobile phones,automobiles, retail fulfillment systems, and personal cognitiveenhancement devices are some types of such embodiments. Some embodimentsreceive signals, such as bit streams captured on other devices,representing audio that contains speech utterances. Servers, desktopcomputers, and mobile phones are some types of such embodiments.

Speech utterances are expressions vocalized by people. For someembodiments, such people are active, intentional users of a system. Somesuch embodiments are conversational virtual assistants, personal robots,and automobiles. For some embodiments, people are passive sources ofuseful information. Some such embodiments are consumer researchmonitors, advertisement displays, and public safety and pre-emptivecriminal evidence collection devices.

Every speech utterance has certain characteristics, some of which aresometimes identifiable from the audio capture of the speech utterance.For example, voice classifier subsystems can often classify an utteranceas to whether it is from a young child or not, whether is from a femaleor male speaker, what is the regional accent of the speaker, what is thespeaker's mood, whether the utterance is a question, whether theutterance is a command, and what parts of the utterance are mostimportant. Some embodiments use the class information from such a voiceclassifier. For example, home entertainment systems provide differentdefault sets of TV show choices for children than for adults, and allowadults but not children to order paid content. Voice controlledautomobiles disable functions, such as a capability to open windowswhile driving at high speed, for command utterances classified as beingfrom a child. Shopping facilitation devices display different clothingoptions in response to general requests from women's voices and men'svoices. Travel advisors provide different restaurant choices in responseto general requests made with different regional accents. Virtualassistants provide short responses to requests classified as hurried.Various types of utterance classification subsystem known in the art areappropriate for various embodiments.

Some embodiments perform speaker identification. Various types ofspeaker identification subsystems known in the art are appropriate forvarious embodiments. Many such speaker identification subsystems work bycomparing parts of utterances to voiceprints stored in a database withUIDs. Some systems use speaker voice identification to determine UIDs,or confirm UIDs asserted from other inputs; retrieve sets of permissionsassociated with UIDs in a stored database; and check them in order toenable authorization for an action. Some such systems are financialservices call centers that allow customers to perform financialtransactions by voice over a telephone connection, computingenvironments with secured access to sensitive data, access-controlledbuildings with secured doors, and voice controlled home automationsystems for adjusting thermostats and operating garage doors.

FIG. 1 illustrates processing a user utterance to request a conditionalaction. User 10 makes an utterance that a microphone captures and thesystem digitizes. ASR module 11 consumes the utterance and produces oneor more transcription hypotheses.

Some embodiments do so by (1) comparing acoustic features to phonemes inan acoustic model trained on numerous labeled speech utterances, theacoustic model trained to output one or more hypothesizedprobability-scored possible phoneme sequences in response to theacoustic features; (2) comparing the hypothesized phoneme sequences towords in a phonetic dictionary that, in a particular order would producethe phoneme sequence; and (3) weighting the probability scores of eachphoneme sequence by the frequency with which the matching words occurtogether and in the hypothesized order in a statistical language modelbuilt from a corpus of language samples, to produce thelikelihood-scored transcription hypotheses.

Various embodiments represent transcription hypotheses as one or more ofstrings of text, strings of phonemes, and other compact tokenizedrepresentations of the utterance. Interpreter 12 consumes thetranscription hypotheses and produces an interpretation. Interpretationsare data structures that represent the hypothesized intent of thespeaker when making the utterance. The interpretation of an utterancerepresent pieces of semantic information contained the utterances andrelationship between the pieces of information. For example, aninterpretation of the utterance, “What's the weather tomorrow?” encodesthat the utterance is a request for information, the type of informationis weather, and tomorrow indicates what weather. For example, aninterpretation of the utterance, “Call Mom.” encodes that the utteranceis a command, the command is to make a call, and the target of the callis an entity, Mom. Various known ways of representing interpretationsare appropriate. Action module 13 consumes the interpretation, andmight, or might not, perform a requested action. The actions that actionmodule 13 can perform varies greatly between various embodiments. Somevirtual assistants are able to look up and report weather forecasts tousers. Some virtual assistants are able to place phone calls to specificcontacts in electronic address books. Some autonomous automobiles areable to navigate and drive themselves to a destination encoded in theinterpretation. Some automatic teller machines are able to authenticateusers and give them cash. Some virtual shopping systems are able tosearch for products and display them to users. Some health monitoringsystems are able to exchange questions and answers with patients andrecord symptoms. Some cognitive enhancement devices are able tostimulate brains with memories and skills.

The system of FIG. 1 includes a voice speaker identification module 15.It consumes the utterance, performs known methods of digital signalprocessing, compares the result to a database of voiceprints 16, andproduces a UID, if it can identify a match. A UID permission checkmodule 17 consumes the UID, compares it to a set of permissions in apermissions database 18, and produces an authorization indication.Action module 13 consumes the authorization indication, and uses it todetermine whether or not to perform the action indicated by theinterpretation resulting from the utterance. Some embodiments includemultiple parallel action modules, and some embodiments perform differentfunctions in the action module based on authorization. For example, avoice-enabled automatic teller machine (ATM), that receives an utterancewithout authorization, might refuse to allow a request for cash, butstill transmit a recording of the audio to a bank-operated server.

Speaker identification is generally most accurate in systems andenvironments with a smaller number of users, such as homes and privatelyowned automobiles. Public systems such as taxis, shopping kiosks, andATMs, which have large numbers of users, cannot easily distinguish fromso many. Some such systems, such as ATMs, use voice speakeridentification as a confirmation to other credentials, such as a cardnumber and personal identification number.

Some embodiments bias characterization (classification or useridentification) based on recent history. Some such embodiments do so bymaintaining a history buffer in random access memory (RAM). Someembodiments maintain a history buffer in a file on a disk drive or othercomputer storage medium. The history buffer stores one or morecharacteristic values and a timestamp for each of a small number ofutterances, such as 5. The characterization process reads the bufferedcharacteristic values; discards ones with timestamps greater than acertain period of time, such as 5 minutes; and uses the remainingcharacteristic values for the biasing function. For example, acharacterization process gives significantly greater weight tocharacteristic hypotheses matching characteristics, such as a UID or aclass, realized for the previous utterance, and slightly greater weightto characteristic hypotheses matching characteristics realized for theprevious five utterances or for the past five minutes. Differentembodiments use different specific values of characteristic-basedweights. For example, a significantly greater bias is one that causes a2× difference in scores for hypotheses that would otherwise have a 1.01×difference in scores and a slight bias is one that causes a 1.02×difference in scores for hypotheses that would otherwise have a 1.01×difference in scores. This is useful because the most recent speaker isthe most likely next speaker in most use cases. However, this risksfrustration because, if an initial characterization is incorrect, thenthe speaker will tend to remain mischaracterized.

FIG. 2 illustrates an embodiment that uses speaker identification tocondition NLP interpretation according to a grammar. User 10 makes anutterance that ASR module 11 consumes to produce one or moretranscription hypotheses, as described above. Interpreter 22 consumesthe transcription hypotheses to produces an interpretation, which actionmodule 23 consumes to perform requested actions, unconditionally. Voicespeaker identification module 25 also consumes the utterance to producea UID.

Interpreter module 22 consumes the UID and uses it to condition itsinterpretation according to a grammar. Some embodiments disallowinterpretation of transcription hypotheses by certain domains of grammarrules, such as to restrict access to unlock a mobile phone to just itsowner. Some embodiments maintain databases of UID-specificinterpretation weights. Such an embodiment of an intelligent assistantrecognizes that some users like sports and others care a lot aboutnature. Accordingly, an utterance about, “How are the bears doing” isinterpreted for one user as a query about the standing of the sportsteam in its division and interpreted for another user as a query aboutthe status of a recovering endangered species.

FIG. 3 shows an example flow chart of a process 30 of interpretation oftranscription hypotheses based on grammar rules where the grammar rulesare conditioned by a UID. The process begins by receiving transcriptionhypotheses from an ASR module in step 31. The process proceeds in step32 to parse each transcription hypothesis according to each grammar ruleto produce an array of interpretations. Furthermore, the processcomputes a likelihood score for each interpretation and stores that, ina RAM, along with which grammar rule was used for each interpretation.In step 33 the process receives a UID associated with the utterance thatproduced the transcription hypotheses. The process looks up a set ofpermissions associated with the UID in a database of users and theirassigned permissions. In step 34 the process proceeds to, for eachinterpretation in the array, check what grammar rule was used to producethe interpretation. The process looks up, for each grammar rule, a setof associated required permissions. In step 35 the process discards fromthe array each interpretation for which the required permission for itsgrammar rule are not met by the permissions assigned to the UID. In step36 the process chooses the most highly scored of the remaininginterpretations, and in step 37 outputs the chosen interpretation for anaction module.

An example grammar rule according to the rule syntax of an embodimentis:

rule weather_request{  action{weather_lookup(date);}  includes{“weather” and (“what's” | (“what” & “is”));}  date = extract_date( ); if(date == NULL) date = today( );  score{0.99}  permissions{pWeather} }

This grammar rule, named weather request, invokes an action, which is tolook up the weather forecast for a specified date variable through a webapplication programming interface (API). The grammar rule parses a giventranscription, and checks whether it includes the word “weather” andeither the word “what's” or both of the words “what” and “is”. The rulecalculates the date variable by extracting a date from thetranscription, if possible. The function for extracting the date returnsa null value if it fails to find a date in the transcription. The ruleassigns today's date if the extracted date is null. The rule defines aconstant score of 0.99, which indicates a very high confidence that theutterance transcription is a request for the weather forecast. Finally,the grammar rule is defined as only valid if the permission namedpWeather is true.

Another example grammar rule is:

rule phone_call{  action{dial(number);}  includes {“call” andextract_person_id( );}  number = number(contact(extract_person_id( ))); score{if(extract_person_id( )!=NULL) 0.8 else 0}  permissions{pDialer}}

This grammar rule, named phone_call, invokes an action, which is to diala phone number. The grammar rule parses a given transcription, andchecks whether it includes the word “call” and one or more words thatidentify a specific person. The grammar rule looks up a phone numberfrom a contact list for the extracted person identification. If thefunction to extract a person identification returns a NULL result, thescore of the grammar rule is 0, otherwise it is 0.8. The grammar rule isdefined as only valid if the permission named pDialer is true.

For a UID assigned the pWeather permission but not the pDialerpermission, the interpreter will provide interpretations requestingweather lookups in response to utterances with such requests. However,the interpreter disregards grammar rules, and consequently does notoutput interpretations requesting phone calls for the voice-identifieduser. A grammar rule based approach provides specific permission-basedcontrols to the many designers of grammar rules, whereas only the systemdesigner can provide permission-based control over the action module.

FIG. 4 illustrates an embodiment that uses utterance class to conditionASR and NLP interpretation according to a grammar. User 40 makes anutterance that ASR module 41 consumes to produce one or moretranscription hypotheses, which interpreter 42 consumes to produces aninterpretation, which action module 43 consumes to perform requestedactions, unconditionally. Utterance classifier module 45 also consumesthe utterance to produce classifications. In various embodiments theclassification is a single Boolean value, a number within a range, or adata structure representing one or more Boolean values and numberswithin ranges.

In some embodiments classification is by gender and the class output ofclassifier 45 is a Boolean value indicating a male or a female gender.In some embodiments the classification is by ethnicity, and the classoutput of classifier 45 is one value from a set of recognizedethnicities such as Afro-American, Chinese, British, Russian, and SouthAsian. In some embodiments the classification is an age, and the classoutput of classifier 45 is a value representing position along acontinuum from young child to senior adult.

ASR module 41 consumes the classifications and uses them to conditionits speech recognition processes. In some embodiments it changes theavailability of words and phrases in the lexicon of its SLM. In someembodiments it changes the probability weights expressed within the SLM.In some embodiments, if the classifier 45 classifies the speaker as achild, ASR module 41 removes profane words from its lexicon and wordsrelated to pharmaceuticals. In some embodiments, if the classifier 45classifies its speaker as having a Chinese accent, it will give slightlyhigher weight to words related to Chinese cooking and slightly lowerweights to words related to Western religions.

Interpreter module 42 also consumes the classifications and uses them tocondition its NLP process. The operation is similar to that ofinterpreter 22 in FIG. 2, except that interpreter 42 conditionsinterpretations according to classes, such as for the purpose ofrestricting access by children to certain content, and focusingadvertising or search results to particular genders and ethnicities.

ASR

There are many ways to implement ASR. Many comprise a speech front end,such as the one 50 shown in FIG. 5. A phoneme recognizer 51 consumesutterance audio acoustic features, such as spectral features, of audioframes. Some embodiments represent sets of phoneme sequence hypothesesas lattices, which capture the commonalities among alternativesequences. The phoneme recognizer 51 uses a trained acoustic model 52.The phoneme recognizer 51 also uses phoneme sequence probabilities of ahidden Markov model (HMM) 53. For each frame of audio and itsneighboring frames, the phoneme recognizer 51 produces a likelihoodscore for each hypothesized phoneme sequence. Other methods of producingphoneme sequence hypotheses are appropriate for various embodiments.

Some embodiments implement acoustic models using deep neural networks.They integrate observation probabilities from the acoustic model 52 andstate transition probabilities from the HMMs 53 using a Viterbioptimization algorithm that determines the N best phoneme sequences, andtheir likelihood scores. Some embodiments implement acoustic models andHMMs together using recurrent neural networks. Some embodiments pruneall but the phoneme sequence hypotheses with likelihood scores above athreshold, or such that a particular number of hypotheses remainavailable.

A speech engine 54 consumes the phoneme hypotheses and producestranscription hypotheses. It maps the set of hypothesized phonemesequences to a set of hypothesized word sequences by matching in allpossible pronunciations from the phonetic word vocabulary withcontiguous subsequences of the phoneme sequences. This statisticalanalysis 55 computes the probabilities of word sequences from those ofthe phoneme sequences. Some embodiments do so by first using a phoneticdictionary to convert phonemes sequence hypotheses to word sequencehypotheses. This involves comparing the ordered sequence of phonemes ineach hypothesis to the phonetic spelling of words in a phoneticdictionary. A phonetic dictionary is a list of words and their phoneticspellings. Note that a words like “cat” has three phonetic sounds,whereas a word like “the” has two. Speech engine 54 fits orders ofphonemes to possible orders of words that would have the same sequenceof phonemes. A SLM 56 weights word sequence hypotheses or phonemesequence hypotheses, based on n-gram phrases and probabilities of theirproximities. N-grams are sequences of words that tend to come togethersuch as “son of a gun”. SLMs model the probabilities of particular wordsor n-grams coming together. For example, the words “ice” and “cream”come together more often than the words “I” and “scream”. Suchprobability models weight different hypotheses in order for the speechengine 54 to choose the most likely word sequence. The most likely wordsequences form the transcription hypotheses output.

The SLM in use defines the lexicon of what spoken words and phrases theASR system can recognize. Different specific users use differentlexicons, specifically resulting from speakers' professions, cultures,age, breadth of education, and other vocabulary-affecting humanconditions. Different speaker classes use different lexicons, generallyresulting from the class's related professions, cultures, age, breadthsof education, and other vocabulary-affecting human conditions. Someembodiments monitor the use of words and phrases by particular classesof speakers or individual users to tune SLMs for best results. Forexample, as new children's movies come out, children tend to use wordsrelated to the movie. The system changes SLM probabilities as the wordusage of children's utterances evolve. Some embodiments give greaterstatistical weight to more recently recognized n-grams. For example, ita recent utterance was about screaming, then the word sequence “Iscream” is more likely than the word sequence, “ice cream”.

Various methods of customizing a SLM for uses by statistical analysisare possible and readily apparent to ordinarily skilled practitioners.FIG. 5 shows one example. A vocabulary filter 58 consumes thecharacteristics, such as a UID or a class, of each utterance and,accordingly, filters the set of n-grams considered by statisticalanalysis 55. Filter criteria are ones such as age, gender, accent, andspecific UID. In some embodiments, the vocabulary filter 58 allows onlycertain sets of n-grams from the SLM that statistical analysis 55 canconsider. In some embodiments, the vocabulary filter 58 adjusts thestatistical weights encoded in the SLM according to the utterancecharacteristics, such as a UID or a class.

FIG. 6 shows another example embodiment. It comprises multipledomain-specific SLMs. A phoneme recognizer 51, acoustic model 52, andHMM 53 operate as in the embodiment of FIG. 5. The embodiment of FIG. 6includes a different design of a speech engine 64. It comprisesstatistical analysis 65, which incorporates analysis of a combination ofa first SLM 66 and a second SLM 67. Various embodiments might,similarly, comprise more than two SLMs. In some embodiments, thestatistical analysis 65 operates on each SLM independently, and choosestranscription hypotheses from the highest scoring hypotheses of eachSLM. SLMs represent the probabilities of sequences of words as found inlarge corpuses of training data. Some embodiments merge the statisticsof n-grams that are common to both SLMs, and perform calculations on themerged statistics. Various embodiments perform merging by linearinterpretation of the probabilities in different SLMs, log-linearinterpretations of the same, or unigram rescaling.

The embodiment of FIG. 6 comprises a first enablement 68 thatconditionally enables the first SLM 66 for statistical analysis and asecond enablement 69 that conditionally enables the second SLM 67 forstatistical analysis. The enablements are both conditioned on thecharacteristics of the utterance. In various embodiments, enablement areconditioned by each other and by other environmental factors such aslocation, time of day, day of week, ambient noise, and various otherfactors that affect the likelihood of different SLM choices. Someembodiments perform SLM merging, per utterance, by look-up of the wordsin the phoneme sequence hypothesis. The enablement of different SLMsconditions the inclusion of their statistics in the merging calculation.This is useful, regardless of the particular choice of SLM mergingalgorithm.

Embodiments of the invention, by eliminating transcription hypotheses,or reducing the weight of unlikely transcription hypotheses, reduce thenumber of NLP parsing operations that computer processors need toperform to provide users with satisfactory accuracy. While the benefitsare small on a per-utterance basis, at the scale of a cloud server farm,the resulting reduction in transcription hypotheses results insignificantly lower power, higher throughput, better accuracy, or acombination of benefits.

Ordinarily skilled practitioners will recognize that the embodimentsdepicted in FIG. 5 and FIG. 6, and described herein, are exemplary andthat various combinations of Boolean enablement and reweighting; varioustypes and combinations of SLM filters; and various algorithms forstatistical analysis, including ones described and others notspecifically described are appropriate for various embodiments.

NLP

There are many ways to implement NLP. Many comprise parsing one or moretranscription hypotheses according to grammar rules. Many compriseparsing parts of speech of transcription expression constituents. FIG. 7shows an embodiment. It begins with a grammar rule parser 71, whichconsumes sets of input transcription hypotheses and interprets each oneaccording to each of a set of grammar rules 72 to produce a set ofinterpretation hypotheses, each with a likelihood score. Various schemasfor specifying grammar rules are appropriate, such as VoiceXML andSpeech Recognition Grammar Specification. Various proprietary grammarparsing systems exist.

The embodiment of FIG. 7 performs a permissions check 73, which consumesthe utterance characteristics as input and produces a list of authorizeddomains. It does so by accessing a database of users and their assignedpermissions. The database is maintained by a system administrator forthe NL processing system, and updated as users add accounts and domaindevelopers create permission types. A domain authorization filter 74consumes interpretation hypotheses, compares their domains to the listof authorized domains, and discards hypotheses from grammar rules fromunauthorized domains. In some embodiments, permissions check 73 providesa list of authorized actions, such as weather lookup and phone dialingwithin domains, and domain authorization filter 74 filters hypotheses bytheir requested action. This is useful, for example, to prevent childrenfrom performing expensive or destructive actions. The domainauthorization filter 74 produces a set of legal interpretationhypotheses. A final stage 75 consumes the set of legal interpretationhypotheses, prunes the set to those with a likelihood score above aspecific threshold, and chooses the one with the highest likelihoodscore for the NLP output if any remain after pruning.

In various embodiments, the permissions check 73 compares one or more ofan utterance classification, speaker classification, and UID to adetermined set of conversation domains that the user and system areauthorized to discuss. In some embodiments, companies define proprietarydomain sets of grammar rules that invoke accesses to APIs with thatoffer proprietary information. Only users with authorized UIDs areallowed to discuss with the system proprietary topics and cause requeststo the proprietary APIs. Accordingly, the permission check 73 excludesthe proprietary domain from the list of authorized domains that itproduces. The system interprets utterances from unauthorized usersaccording to whatever default grammar rules it authorizes. If theutterance is general in nature, a non-proprietary interpretationhypothesis will yield the highest interpretation likelihood score andgive a generic response. If the utterance is very specific to theproprietary information, no other grammar rules will yield a highlyscored interpretation hypothesis, and the query will produce no usefulresponse.

Some embodiments allow for grammar rules related to mature or offensivesubject matter. For utterances classified as being from a child's voice,the mature or offensive domains will be unavailable for interpretations.As a result, if a child requests mature or offensive content, theutterance will find a most highly scored interpretation hypotheses froma generic grammar rule, or will find no significantly highly scoredhypothesis and receive no useful response. This way, devices can satisfysome adults' wishes to engage in crude spoken interactions, while thedevice automatically remains child-safe.

FIG. 8 shows an example of an embodiment that does not block domains,but adjusts the likelihood scores of interpretation hypotheses accordingto the characteristics of the utterance. It comprises parsing 71according to grammar rules 72 to produce interpretation hypotheses, asin the embodiment of FIG. 7. A module 84 consumes interpretationhypotheses and characteristics of the utterance and applies weights,based on the characteristics, to the interpretation hypotheses toproduce a set of reweighted interpretation hypotheses. Reweighting is aprocess of scaling the scores that grammar rules compute. A final stage85 consumes the set of reweighted interpretation hypotheses, prunes theset to those with a likelihood score above a specific threshold, andchooses the one with the highest likelihood score for the NLP output ifany remain after pruning.

Some embodiments use an age group characteristic to give relativelyhigher weight to toy domains in response to a characteristic indicatingthat the speaker is a child. Some embodiments apply weights at finergranularity than domains. For example, some embodiments, in response toan indication that the speaker is a child, give increased weight tointerpretation hypotheses based on the homonym “engineer” from grammarrules relating to trains, whereas the word would have relatively higherweight for domains about technical professions for adult class speakers.For a query, “show me a picture of an engineer” a child would get adrawing of a person in a train engine and an adult would get a pictureof a person with a pocket protector and glasses sitting at a desk.

Some embodiments use a gender classification to give higher weight forinterpretations based on the homonym “pumps” to shoe grammar rules forwomen and fluid-moving machinery for men. For a query, “where's thenearest store that sells pumps” a woman would get a response showingshoe stores and a man would get a response showing athletic equipmentstores. Some embodiments use a regional accent classification to givehigher weight for interpretations based on the homonym “boot” toautomotive grammar rules for British speakers and shoes for Americanspeakers. For a query, “how to get dirt out of a boot” aBritish-accented user would get instructions for Hoovering a car in agarage and an American-accented speaker would get instructions forrubbing with a gentle cloth. Some embodiments use prosody classificationto give higher weight for interpretations that have a rising intonationat the end of the expression to grammar rules that expect yes/noquestions.

Some embodiments apply weights to interpretations based on variouscriteria. For example, to respond about the weather in “Paris”, somevirtual assistants detect the proximity of the user to each of Paris,Tex. and Paris, France to interpret which one. Such virtual assistantsalso consider the relative popularity of queries about each city toweight the choice of interpretation. Some embodiments also use an accentclassification to further weight the choice. Detecting a French accentincreases the score for the interpretation about Paris, France.Detecting a Texas accent increases the score for interpretations aboutParis, Tex.

The embodiments of FIG. 7 and FIG. 8 use unconditional grammar rules,and apply conditioning to completed interpretations. FIG. 9 shows anembodiment with a conditional grammar. Conditional grammar rules arewritten in a conditional grammar definition language and comprisestatements that are effective to control grammar interpreters tointerpret transcription hypotheses conditionally when a systemidentifies a specific characteristic of a speech utterance to be true.One type of conditional statement is an if statement. Another type is awhile statement. One example if statement is, “if(age!=child)” where“age!=child” is the condition indicating that the age characteristic isnot a child. The grammar interpreter only interprets the statementfollowing the conditional statement if the system identifies thecondition as being true.

A conditional grammar offers greater configurability, but requiresrelatively more complexity to program conditions. Grammar rules mayinclude conditions based on the values of characteristics. Variouslanguages for defining grammars support defining conditions based onsemantic information in a hypothesized utterance. One such rule would beto resolve pronoun references, conditioned on whether the pronoun is amale or female one. However, the embodiment of FIG. 9 further allows theconditioning of grammar rules based on utterance characteristics. Theembodiment comprises parsing 91 according to conditional grammar rules92 to produce interpretation hypotheses. A final stage 85 consumes theset of interpretation hypotheses, prunes the set to those with alikelihood score above a specific threshold, and chooses the one withthe highest likelihood score for the NLP output in any remain afterpruning.

An example conditional grammar rule according to the rule syntax of anembodiment is:

rule adult_call {

-   -   action {dial(number);}    -   includes {“call” and extract_person_id( );}    -   number=number(contact(extract_personid( )));    -   score{if(extract_person_id( )!=NULL) 0.8 else ( )}    -   condition {voice_age_estimate>12}

}

This grammar rule, named adult_call, invokes an action, which is to diala phone number. The grammar rule parses a given transcription, andchecks whether it includes the word “call” and one or more words thatidentify a specific person. The grammar rule looks up a phone numberfrom a contact list for the extracted person identification. If thefunction to extract a person identification returns a NULL result, thescore of the grammar rule is 0, otherwise it is 0.8. The grammar rule isdefined as only valid if the voice classification estimates that the ageis greater than 12.

The embodiments of FIG. 7 and FIG. 8 condition interpretation hypothesesbased on their domain. Since domains represent sets, often large, ofgrammar rules they operate at a coarse granularity. Conditional grammarrules give grammar developers the option for fine-grained subtlety basedon characteristics of an utterance. For example, an utterance about“football” spoken with a British accent is, with a high likelihoodscore, in the domain of sports. However, a conditional grammar rule can,define a higher weight to soccer if the utterance is spoken with aBritish English accent than if it is spoken with an American Englishaccent since soccer is called football in Britain.

To block individual rules, a grammar developer may set conditionalgrammar rule weights to zero. Grammar developers may also conditionrules based on particular UIDs. Some systems require a user to recite aphrase, such as one that uses all English phonemes and is long enough togather statistics, in order to match against a voiceprint. Upondetecting a match, the system enables the UID for all utterances with avoice match within a reasonable distance of the voiceprint. Variousembodiments use different algorithms for voice matching. In someembodiments, distance is calculated as the absolute difference in peaksof formant frequency bands for corresponding strongly hypothesizeddiphones. This requires utterances with corresponding diphones. Someembodiments match based on individual phonemes, of which there is moreprobable correspondence matches between different utterances. If aspecified period of time passes without receiving an utterancesufficiently close to the voiceprint, then the system disables the UIDuntil the user recites the key phrase again. One phrase that uses allEnglish phonemes is, “That quick beige fox jumped in the air over eachthin dog. Look out, I shout, for he's foiled you again, creating chaos.”Another such phrase is, “With tenure, Suzie'd have all the more leisurefor yachting, but her publications are no good.”

Embodiments of the invention, by eliminating interpretation hypotheses,eliminating grammar rules, or reducing the weight of unlikelyinterpretation hypotheses, reduces the amount of processing required forNLP parsing with satisfactory accuracy. While the benefits are small ona per-utterance basis, at the scale of a cloud server farm, theresulting reduction in interpretation hypotheses results insignificantly lower power, higher throughput, better accuracy, or acombination of benefits.

Ordinarily skilled practitioners will recognize that the embodimentsdepicted in FIGS. 7-9, and described herein, are exemplary and thatvarious combinations of Boolean enablement and reweighting; variouscombinations of conditional grammars and conditional pruning ofinterpretations; and various combinations of characteristics, includingones described and others not specifically described are appropriate forvarious embodiments.

System Partitioning

Ordinarily skilled practitioners will also recognize that theembodiments depicted in FIGS. 1-3, and described herein, are exemplaryand that various method steps and system components, including onesdescribed and others not specifically described are appropriate forvarious embodiments, and that not all are necessary for all embodiments.Furthermore, any number or combination of method steps and systemcomponents may be implemented by and within: servers or clients;software or hardware; mobile or stationary devices; large or portabledevices; always-on or occasionally powered devices; display-enabled ornon-visual devices; and touch-enabled or voice-only devices.

FIG. 10 shows a software-implemented embodiment that runs on computerprocessors. Computer system 100 comprises parallel processors 101 and102, which connect to interconnect 103, through which the processors canexecute software from instructions and operate on data stored in randomaccess memory (RAM) 104 and non-transitory, non-volatile memory 105.Software running on computer system 100 accesses the Internet throughnetwork interface 108, provides a GUI through display controller 106,and accepts user input through I/O controller 107, all of which are alsoconnected through interconnect 103.

In some embodiments, the processors are ARM instruction set processors.In some embodiments they are x86 processors. In some embodiments,memories, controllers, and interfaces are all on the samesystem-on-chip. In some embodiments, some elements are in differentchips. In some embodiments, the non-volatile memory is a hard diskdrive. In some embodiments, it is a solid-state drive. In someembodiments, the display controller connects to a local device displaypanel through a mobile industry processor interface (MIPI) displayserial interface (DSI). In some embodiments, the display controllerconnects to a HDMI connector. In various embodiments, the I/O controllerinterfaces to touch screens, keyboards, mice, microphones, speakers, andUSB connectors. In various embodiments, the network interface is anEthernet cable interface, WiFi interface, Bluetooth interface, and 5GLTE interface. Though examples cited in this application are use theEnglish language, ordinarily skilled practitioners will recognize thatthe methods and machines disclosed and claimed herein can be practicedon almost any human language, including Chinese, Japanese, Korean,German, Spanish, French, Hindi, Italian, Russian, Dutch, Arabic,Turkish, Swedish, Polish, Hebrew, and Tuvaluan, among others.

What is claimed is:
 1. A non-transitory computer-readable medium storinga grammar rule, the grammar rule being written in a conditional grammardefinition language, the rule being effective to control a grammarinterpreter to interpret a transcription of a speech utterance, thegrammar rule comprising an interpretation condition, the interpretationcondition being dependent upon a specific identified characteristic ofthe speech utterance.
 2. The non-transitory computer-readable medium ofclaim 1 wherein the interpretation condition is a Boolean enablement. 3.The non-transitory computer-readable medium of claim 1 wherein theinterpretation condition determines a weighting that affects thecomputation of a likelihood score.
 4. A system comprising one or moreprocessing devices, the one or more processing devices programmed to:execute a grammar interpreter enabled to interpret transcriptions ofspeech utterances according to grammar rules written in a conditionalgrammar definition language wherein the grammar rules may compriseinterpretation conditions for the interpretation, the interpretationconditions being based on characteristics of the speech utterances. 5.The system of claim 4 wherein the interpretation conditions are Booleanenablements.
 6. The system of claim 4 wherein the interpretationconditions determine weightings that affects the computation oflikelihood scores.
 7. A method comprising, by a computer systemcomprising a processing device: interpreting transcriptions of speechutterances according to grammar rules written in a conditional grammardefinition language, the grammar rules comprising interpretationconditions, the interpretation conditions being dependent upon specificidentified characteristics of the speech utterances.
 8. The method ofclaim 7 wherein the interpretation conditions are a Boolean enablement.9. The method of claim 7 wherein the interpretation conditions determineweightings that affect the computation of likelihood scores.
 10. Amethod of recognizing a transcription of a speech utterance, the methodcomprising: characterizing, by a computer system, a speech utterance todetermine at least one characteristic; determining, by the computersystem, from the speech utterance a plurality of phoneme sequencehypotheses; recognizing, by the computer system, a set of transcriptionhypotheses from the plurality of phoneme sequence hypotheses conditionedon the at least one characteristic, each transcription hypothesis of theset of transcription hypotheses having a likelihood score associatedtherewith; and pruning, by the computer system, the set of transcriptionhypotheses to a subset of transcription hypotheses having the likelihoodscore thereof meeting a threshold condition
 11. A non-transitorycomputer-readable medium comprising code effective to cause one or moreprocessors to: characterize a speech utterance to determine at least onecharacteristic; determine from the speech utterance a plurality ofphoneme sequence hypotheses; recognize a set of transcription hypothesesfrom the plurality of phoneme sequence hypotheses conditioned on the atleast one characteristic, each transcription hypothesis of the set oftranscription hypotheses having a likelihood score associated therewith;and prune the set of transcription hypotheses to a subset oftranscription hypotheses having the likelihood score thereof meeting athreshold condition.
 12. The non-transitory computer-readable medium ofclaim 11 wherein the at least one characteristic comprises speakeridentification.
 13. The non-transitory computer-readable medium of claim11 wherein at least one characteristic comprises a classificationaccording to one or more criteria.
 14. The non-transitorycomputer-readable medium of claim 13 wherein the one or more criteriainclude one or more of age, gender, mood, and prosody.
 15. Thenon-transitory computer-readable medium of claim 11 wherein the at leastone characteristic indicates a weight.
 16. A non-transitorycomputer-readable medium comprising a grammar rule, the grammar rulebeing written in a conditional grammar definition language, the rulebeing effective to control a grammar interpreter to interpret atranscription hypothesis, the grammar rule comprising a statement thatenables the interpretation conditionally when a specific characteristicof a speech utterance is identified.